package com.java.jvm.demo.chapter01;

/**
 * 获取类加载器的方法
 *
 * @author wangning
 * @create 2021-10-14 20:44
 */
public class ClassLoaderTest2 {
	public static void main(String[] args) throws Exception {
		//1.
		ClassLoader classLoader = Class.forName("java.lang.String").getClassLoader();
		System.out.println("classLoader = " + classLoader);
		//2.
		ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
		System.out.println("contextClassLoader = " + contextClassLoader);
		//3.
		ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
		System.out.println("systemClassLoader = " + systemClassLoader);
		//4.


	}
}
